{include file="common/_meta" /}

<title>栏目添加</title>
<meta name="keywords" content="李志立，lizhilimaster@163.com">
<meta name="description" content="李志立，lizhilimaster@163.com">
<style>
	#lod {
		position: absolute;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.2);
		z-index: 999;
		display: none;
	}

</style>

</head>
<body>
<div id="lod">
	<div style="width: 1000px;height: 400px;background-color: #ffffff;margin: 100px auto;padding: 45px 15px">
		<h4 style="text-align: center;font-size: 40px;font-weight: 600">正在操作数据库，请等待！</h4>
		<div class="loading"  style="width: 80px;height:80px;background-size:100% 100%; background-repeat:no-repeat;margin: 80px auto">
		</div>
	</div>
</div>

	<div class="page-container">
		<div class="panel panel-danger">
			<div class="panel-header">注意</div>
			<div class="panel-body"> 1，获取public 文件内文件夹和safe 文件夹。 2，会非常耗资源。请耐心等待
			</div>
		</div>
		<form action="" method="post" class="form form-horizontal" id="form-category-add">
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2">
					<span class="c-red">*</span>
					选择地址：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<span class="select-box">
						<select class="select" id="type" name="type">
							<option value>请选择地址</option>
							{volist name="arr" id="vo"}
							<option value="{$vo.dir}">{$vo.name}</option>
							{/volist}
						</select>
					</span>
				</div>
				<div class="col-3">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2">
					<span class="c-red">*</span>
					设置大小：</label>
				<div class="formControls col-xs-4 col-sm-4">
					图片宽：<input type="number" class="input-text" value="1000" placeholder="填写压缩后宽" id="width" name="width" style="width: 60%"> px
				</div>
				<div class="formControls col-xs-4 col-sm-4">
					图片高：<input type="number" class="input-text" value="" placeholder="填写压缩后高" id="height" name="height" style="width: 60%"> px
				</div>
				<div class="col-3">
				</div>
			</div>
			<div class="row cl">
				<div class="col-9 col-offset-2">
					<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
				</div>
			</div>
		</form>
	</div>
	{include file="common/_footer" /}
	<script type="text/javascript" src="__MANAGE__lib/jquery.validation/1.14.0/jquery.validate.js"></script>
	<script type="text/javascript" src="__MANAGE__lib/jquery.validation/1.14.0/validate-methods.js"></script>
	<script type="text/javascript" src="__MANAGE__lib/jquery.validation/1.14.0/messages_zh.js"></script>
	<script type="text/javascript" src="__MANAGE__lib/function.js"></script>
	<script type="text/javascript">
		$(function() {
			$('.skin-minimal input').iCheck({
				checkboxClass: 'icheckbox-blue',
				radioClass: 'iradio-blue',
				increaseArea: '20%'
			});
			let wo=$("#form-category-add").validate({
				rules: {
					type: {
						required: true,
					},
					width: {
						required: true,
					},
				},
				submitHandler:function(form) {
					$("input[type=\"submit\"]").addClass('disabled').attr("disabled",true);
					var index = layer.load(1, {
						shade: [0.1,'#fff'] //0.1透明度的白色背景
					});
					setTimeout(()=>{
						$("input[type=\"submit\"]").removeClass('disabled').attr("disabled",false);
						layer.close(index);
					},1000)
					form.submit();
				}
			});
		});
		function textlength() {
			var nmb = $('#mark').val().length;
			$('.textarea-length').text(nmb);
			if (nmb > 100) {
				$('#mark').css("background-color", "orangered");
			} else {
				$('#mark').css("background-color", "white");
			}
		}
		function zhuan(){
			$('#enname').val(getPinYinByName($('#cnname').val()));    
		}
		
	</script>
</body>
</html>
